﻿<UserControl x:Class="Newgen.Core.Controls.WallItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             Foreground="White" Margin="0,30,70,0" MaxWidth="500" Opacity="0">
    <UserControl.RenderTransform>
        <TranslateTransform X="-100"/>
    </UserControl.RenderTransform>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="UserControl.Loaded">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation x:Name="TranslateAnim" Storyboard.TargetProperty="(RenderTransform).X" From="-100" To="0" Duration="0:0:0.4" DecelerationRatio="0.3"/>
                    <DoubleAnimation x:Name="OpacityAnim" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.4"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </UserControl.Triggers>
    <DockPanel>
        <Image Name="Avatar" DockPanel.Dock="Left" Margin="0,10,10,0" Width="50" Height="50" VerticalAlignment="Top"/>
        <Grid Name="CommentsCountGrid" DockPanel.Dock="Right" Width="46" Height="45" VerticalAlignment="Top" Margin="10,10,0,0" Visibility="Collapsed" Cursor="Hand" MouseLeftButtonUp="CommentsCountGridMouseLeftButtonUp">
            <Image Source="/Resources/comments_icon.png" Width="46" Height="45"/>
            <Viewbox>
                <TextBlock Name="CommentsCount" Foreground="White" Text="0" Margin="5,0,5,5"/>
            </Viewbox>
        </Grid>
        <StackPanel Orientation="Vertical">
            <TextBlock Name="Username" FontSize="26" TextWrapping="Wrap" MouseLeftButtonUp="UsernameMouseLeftButtonUp" Cursor="Hand"/>
            <TextBlock Name="SentFrom" FontSize="16" Margin="0,-3,0,0" TextWrapping="Wrap"/>
            <TextBlock Name="Message" FontSize="16" Margin="0,0,0,0" Foreground="LightGray" TextWrapping="Wrap"/>
            <DockPanel Name="RepostPanel" Visibility="Collapsed" Margin="0,5,0,0">
                <Image DockPanel.Dock="Left" Name="RepostImage" Width="50" Height="50" VerticalAlignment="Top"  Stretch="UniformToFill" Margin="0,3,8,0"/>
                <StackPanel>
                    <TextBlock Name="RepostTitle" FontSize="16" TextWrapping="Wrap" Cursor="Hand" MouseLeftButtonUp="RepostTitleMouseLeftButtonUp">
                        <TextBlock.Style>
                            <Style TargetType="TextBlock">
                              <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                  <Setter Property="TextDecorations" Value="Underline" />
                                </Trigger>
                              </Style.Triggers>
                            </Style>
                          </TextBlock.Style>
                    </TextBlock>
                    <TextBlock Name="RepostText" Foreground="LightGray" FontSize="14" TextWrapping="Wrap"/>
                </StackPanel>
            </DockPanel>
            <StackPanel Name="CommentsPanel" Orientation="Vertical" Visibility="Collapsed" Margin="0,10,0,0"/>
        </StackPanel>
    </DockPanel>
</UserControl>
